﻿Public Class ErrorConsole

    Private _exceptions As List(Of String)

    Public Sub Write(ByVal ex As Exception)

        Dim _str As String = _
            String.Format("({0}){1}", ex.StackTrace, ex.Message)
        _exceptions.Add(_str)
        ListBox1.Items.Add(_str)
    End Sub

    Public Sub New()

        ' This call is required by the designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.

        _exceptions = New List(Of String)

    End Sub

    Public Sub Write(ByVal Str As String)
        _exceptions.Add(Str)
        ListBox1.Items.Add(Str)
    End Sub

End Class

